/**
 * @author liangxi
 * @since 2024/4/10
 */

#ifndef DESIGNPATTERN_HASQUARTERSTATE_H
#define DESIGNPATTERN_HASQUARTERSTATE_H

#include <cstdlib>
#include <random>
#include "../State.h"

class GumballMachine;

class HasQuarterState : public State {
public:
    HasQuarterState() = default;

    GumballMachine *getMGumballMachine() const;

    void setMGumballMachine(GumballMachine *mGumballMachine);

    void insertQuarter() override;

    void ejectQuarter() override;

    void turnCrank() override;

    void dispense() override;


private:
    GumballMachine *mGumballMachine{nullptr};
};

// GumballState

#endif //DESIGNPATTERN_HASQUARTERSTATE_H
